EOF proposed file format (revision 'H'):

	FILE HEADER:
8 bytes:	'E','O','F','S','O','N','H','\0'
8 bytes:	(padding)

	CHART PROPERTIES:
4 bytes:	Project revision number
*1 byte:	Timing format (0=Milliseconds,1=Deltas)
*4 bytes:	Time division (only to be used if the timing format is "deltas", will probably be informational only unless EOF changes the time division used)

	SONG PROPERTIES:
2 bytes:	Number of INI strings
INI STRING CHUNK, for each INI string:
{
*	1 byte:		INI setting type (0=Custom,1=Album,2=Artist,3=Title,4=Frettist,5=Genre,6=Year,7=Loading Text,8=Icon ID,9=Unlock ID,10=Unlock ID required,11=Unlock text string,...)
!	The following Icon IDs are supportedly natively in FoFiX: rb1,rb2,rbdlc,rbtpk,gh1,gh2,gh2dlc,gh3,gh3dlc,gh80s,gha,ghm,ph1,ph2,ph3,ph4,phm.  Custom icon strings can be used in FoFiX.
!	Unlock text string is the text that FoFiX will display if this chart is not unlocked
*	2 bytes:	INI setting string length
*	[varies:]	INI setting string
}

2 bytes:	Number of INI booleans
INI BOOLEAN CHUNK, for each INI boolean:
{
*	1 byte:		INI boolean type (0=Reserved,128-255=Reserved,1=Lyrics present,2=Eighth note HOPO,3=background.png present,4=Is a cover,5=Is a tutorial,...)
!	It is assumed that the presence of this boolean will mean that the relevant song.ini setting will be flagged as "true" (this is how all current boolean INI settings work)
!	If some future boolean INI setting needs to be explicitly marked as "false" for some reason, EOF could set the MSB of the type value above to indicate as such, otherwise the reserved bit should be 0
!	Tutorial songs are hidden during quickplay in FoFiX
}

2 bytes:	Number of INI numbers
INI NUMBER CHUNK, for each INI number:
{
*	1 byte:		INI number type (0=Reserved,1=Cassette color,2=Band difficulty level,3=HOPO frequency,4=User specified chart version #,...)
*	4 bytes:	INI number value
!	Cassette color is an 8 bit intensity each for Red, Green and Blue
!	HOPO frequency is 0-5, and is used if the player's "Song HOPO Freq" FoFiX setting is set to "Auto"
}

	CHART DATA:
2 bytes:	Number of OGG profiles
OGG PROFILE CHUNK, for each OGG profile:
{
*	2 bytes:	OGG file name string length
	[varies:]	OGG file name string
*	2 bytes:	Original audio file name string length
*	[varies]:	Original audio file name
*	2 bytes:	OGG profile comments string length
*	[varies:]	OGG profile comments string
	4 bytes:	MIDI delay for this profile (milliseconds)
*	1 byte:		OGG profile flags (such as whether the file was originally provided as an OGG or if it was re-encoded, is being mixed with active OGG profile audio, etc)
}

4 bytes:	Number of beats in the chart
BEAT CHUNK, for each beat:
{
	4 bytes:	PPQN
	4 bytes:	Position (in milliseconds or delta ticks)
	4 bytes:	Beat flags
*	1 byte:		Key signature (If the MSB is zero, the KS is defined by the number of flats, otherwise the number of sharps.  Bits 0-6 define the number of sharps/flats in this Key Signature)
}

4 bytes:	Number of text events
TEXT EVENT CHUNK, for each text event:
{
*	2 bytes:	Text event string length
*	[varies:]	Text event string
	4 bytes:	Associated beat number
*	2 bytes:	Associated track number (0xFF if it applies to the entire chart, such as generic section markers)
}

*4 bytes:	Number of tracks
TRACK CHUNK, for each track:
{
*	2 bytes:	Track name string length
*	[varies:]	Track name string
*	2 bytes:	Track number (Matching macros such as EOF_TRACK_GUITAR)
!	EOF currently uses macros to define guitar, bass, lead guitar, rhythm guitar, drum and vocals, but it may be ultimately necessary to allow custom tracks which can be any of those types
!	So the track behavior below should define the track's ability to use HOPOs, etc.
*	1 byte:		Track behavior (0=Guitar/Bass,1=Drum/pro drum,2=Vocal,3=Keys,4=Pro guitar/bass,5=Pro keys)
*	1 byte:		Track type (0=Global,1=Guitar,2=Bass,3=Drum,4=Vocal,5=Keys,6=Pro Guitar,7=Pro Bass,8=Pro Drum,9=Pro Keys,10=Variable Lane Guitar,11=Variable Lane Drums, ...)
!	Rock Band 3 charts have separate tracks for the full 22 fret chart (PART REAL_GUITAR_22) usable on the Squier guiter, and a version transposed to be accurate on 17 frets (PART REAL_GUITAR)
*	1 byte:		Track difficulty level (0-6 or 0xFF)
*	4 bytes:	Track flags (ie. which difficulties are locked for editing)

*	4 bytes:	Number of section types stored for this track
*	SECTION TYPE CHUNK, for each section type
*	{
*		2 bytes:	Type of section (ie. solo, star power, lyric phrase, trill, yellow tom, blue tom, green tom, arpeggio, pro keys trainer, custom MIDI note, preview section, bookmark, fret catalog entry)

*		4 bytes:	Number of the specified sections stored
*		SECTION CHUNK, for each of the specified type of sections
*		{
*			2 bytes:	Section name string length
*			[varies:]	Section name string
*			1 byte:		The difficulty that this phrase applies to (0xFF if it does not apply to a single difficulty, such as a solo phrase)
*			4 bytes:	Start position of section (in milliseconds or delta ticks)
*			4 bytes:	End position of section (in milliseconds or delta ticks)
*			2 bytes:	Section flags
*		}
*	}
!	There can be a "global track" that stores sections or other data that apply to multiple tracks, such as unison SP sections,
!	or sections that don't apply to any specific track, such as a song preview section or bookmarks
!		For bookmarks, there should be no string, and the end position will be ignored
!		For fret catalog entries, the flags field stores the track number the catalog entry is from

	[GUITAR/BASS/DRUM/PRO DRUM/KEYS TRACK FORMAT]
		4 bytes:	Number of notes
		NOTE CHUNK, for each note
		{
*			2 bytes:	Chord name string length
*			[varies:]	Chord name string
			1 byte:		Note type (difficulty)
			1 byte:		Note bitflag (on/off statuses)
			4 bytes:	Note position (in milliseconds or delta ticks)
			4 bytes:	Note length (in milliseconds or delta ticks)
*			2 bytes:	Note flags (allow for more flags.  When this is implemented, ensure that Expert+ bass gets its own status flag again)
		}

	[VOCAL TRACK FORMAT]
*		1 byte:		Rock Band compliance flag (1=compliant, the chart doesn't use pitches outside the allowed range of [36,84])
*		1 byte:		Tone set number assigned to this track (ie. 0=Grand Piano, 1=MIDI device, ...)
		4 bytes:	Number of lyrics
		LYRIC CHUNK, for each lyric:
		{
*			2 bytes:	Lyric text string length
*			[varies:]	Lyric text string
*			1 byte:		Track number (ie. 1=PART VOCALS, 2=PART HARM1, 3=PART HARM2...)
			1 byte:		Note pitch
			4 bytes:	Lyric position (in milliseconds or delta ticks)
			4 bytes:	Lyric position (in milliseconds or delta ticks)
*			2 bytes:	Lyric flags
		}

	[PRO GUITAR/PRO BASS TRACK FORMAT]
*		1 byte:		Rock Band compliance flag (1=compliant, no fret higher than 22 is used)

*		1 byte:		The highest fret number allowed in this track (17 for Mustang, 22 for Squier)
*		1 byte:		The number of strings on this track's guitar (ie. 4 for standard bass guitar, 6 for standard guitar)
*		PRO GUITAR TUNING CHUNK, for each string
*		{
*			1 byte:		The note this string sounds when played open (no frets held)
*		}
!			The first string defined refers to string 1, the lowest guage string (high E on a standard guitar), consistent with guitar terminology
!			The note numbering system is based on A440 tuning, where note A4 is 440Hz and is referred to as note 69.  Mid C (note C4) is referred to as note 60

*		4 bytes:	Number of notes
*		PRO GUITAR NOTE CHUNK, for each note
*		{
*			2 bytes:	Chord name string length
*			[varies:]	Chord name string
*			1 byte:		Note type (difficulty)
*			2 bytes:	Note bitflag (string use statuses: set=played, reset=not played)
!				Bit 0 refers to string 1 (high E), bit 5 refers to string 6 (low E), consistent with guitar terminology
*			FRET CHUNK, for each set bit in the guitar note bitflag
*			{
*				1 byte:		Fret # tab (0=Open strum, #=Fret # pressed, 0xFF=Muted)
*			}
*			4 bytes:	Note position (in milliseconds or delta ticks)
*			4 bytes:	Note length (in milliseconds or delta ticks)
*			4 bytes:	Note flags (allow 32 flags for an unforsee-able number of techniques such as tapping, bending, etc)
*		}

	[PRO KEYS TRACK FORMAT]
*		1 byte:		Rock Band compliance flag (1=compliant, the chart doesn't use notes outside the currently unknown accepted range)
*		1 byte:		Tone set number assigned to this track (ie. 0=Grand Piano, 1=MIDI device, ...)

*		4 bytes:	Number of chords
!			For the sake of this format, "chord" will refer to all notes defined at a given position in a difficulty in a keys track,
!			even if there are not multiple notes, and notes will refer to individual notes in the chord
*		KEY CHORD CHUNK, for each note
*		{
*			2 bytes:	Chord name string length
*			[varies:]	Chord name string
*			1 byte:		Chord type (difficulty)
*			1 byte:		Chord hand (1=right hand- ie. melody, 2=left hand- ie. chords)
!				Rock Band 3 won't support two hand keys tracks, so this would be a feature for other games such as Synthesia/Doremi Mania)
!				Two chords should be allowed to be defined at any timestamp, as each hand should be allowed to play one
*			1 byte:		Number of keys played in this note/chord
*			KEY NOTE CHUNK, for each key in the chord
*			{
*				1 byte:		Note number
*				1 byte:		Note velocity
*				1 byte:		Note flags (for storing accidentals)
*			}

*			4 bytes:	Note position (in milliseconds or delta ticks)
*			4 bytes:	Note length (in milliseconds or delta ticks)
*			2 bytes:	Chord flags
*		}

	[VARIABLE LANE GUITAR/DRUM TRACK FORMAT]
*		1 byte:		DTX Mania compliance flag (1=compliant, the track has 8 drum lanes?)
*		1 byte:		The number of lanes included in this track

*		4 bytes:	Number of notes
*		EXTRA LANE CHORD CHUNK, for each note
*		{
*			1 byte:		Note type (difficulty)
*			1 byte:		Number of lanes played at this position
*			EXTRA LANE NOTE CHUNK, for each lane played at this position
*			{
*				1 byte:		Lane number containing a playable note
*			}
*			4 bytes:	Note position (in milliseconds or delta ticks)
*			4 bytes:	Note length (in milliseconds or delta ticks)
*			2 bytes:	Note flags (among other specialized flags, DTXMania supposedly tracks whether hi-hat is open/closed)
*		}
}
!	Open bass notes are planned to be charted on a sixth lane, so GH style charts with open bass will probably need to be charted on a variable lane bass track titled "PART BASS"


!NOTES:

!Rock Band 3 has a new type of phrase people are referring to as trill phrases
!This is sort of like a section with a freestyle strumming for a single button (fret 1-5), perhaps more
!Supposedly, the player can strum as slowly or quickly as desired provided that the specific notes defined
!in the trill phrase are hit.

!Rock Band 2 and Rock Band 3 (Pro drums) use MIDI markers to define which yellow, blue and green notes are to be played
!as toms (pads) instead of cymbals (which are separate from the 4 pads on a compatible drum set controller).
!	Note:  Pro drums are currently being implemented as note statuses, requiring extra logic to simulate phrasing

!For keys and vocal track charting in grand staff mode, track accidentals for each note in each chord (4 bits):
!The flat/sharp status of each line in the staff is refreshed at the beginning of each measure
!If a note extends across a measure, its flat/sharp status is retained for the duration of that measure
	00 : No accidental (any previous flat/sharp is still in effect)
	01 : Flat (lower note by one semitone)
	10 : Sharp (raise note by one semitone)
	11 : Natural (cancel any flat/sharp in effect for this line in the staff, until the next measure/accidental/key change)

!Difficulty levels 0 through 5 are a regular graduated scale of difficulty, 6 represents "5 devil skulls" which is extra hard
!FoFiX doesn't reportedly support a vocal difficulty value yet, but planning ahead doesn't hurt
